﻿using MB.Orm.DB;
using Model;
using Public.DataAccess;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Business
{
    public class BPurchaseInOutSum:IFace.IFacePurchaseSum
    {
        public List<PurchaseInOutSumInfo> GetPurchaseSumList2(int pageIndex, int pageSize, ref Dictionary<string,decimal> dicTotalField, params object[] parValue)
        {
            using (var DbScope = new OperationDatabaseScope(new OperationDatabaseContext("NewWeb")))
            {
                List<PurchaseInOutSumInfo> list = PagedDatabaseExcuteByXmlHelper.NewInstance.GetPagedObjectsByXml4<PurchaseInOutSumInfo>
                                                ("PurchaseInOutSum", "GetPurchaseSum", pageIndex, pageSize, ref dicTotalField, parValue);
                return list;
            } 
        }
         

        public List<PurchaseInOutSumInfo> GetPurchaseSumList(int pageIndex, int pageSize, out int total, params object[] parValue)
        {
            using (var DbScope = new OperationDatabaseScope(new OperationDatabaseContext("NewWeb")))
            {
                List<PurchaseInOutSumInfo> list = PagedDatabaseExcuteByXmlHelper.NewInstance.GetPagedObjectsByXml3<PurchaseInOutSumInfo>
                                                ("PurchaseInOutSum", "GetPurchaseSum", pageIndex, pageSize, out total, parValue);
                return list;
            } 
        }
    }
}
